/*
 * @Description: 学生管理系统的测试类
 * 
 * @Author: rendc
 * 
 * @Date: 2025-07-29 17:01:22
 * 
 * @LastEditors: rendc
 * 
 * @LastEditTime: 2025-07-30 11:16:30
 */

import java.util.Scanner;

public class StudentManagementTest {

  public static void main(String[] args) {
    // // 创建一个学生对象
    // Student s1 = new Student(1, "张三", "男", 18);
    // // show
    // s1.show();
    // 创建学生管理系统对象
    StudentManagement sManagement = new StudentManagement();
    // 预填加一个测试学生
    // sManagement.myAddStudent();
    Loop: while (true) {
      // 调用固定内容的输出方法
      sManagement.print();
      // 获取用户的输入
      Scanner scanner = new Scanner(System.in);
      int option = scanner.nextInt();
      switch (option) {
        case 1:
          // System.out.println("add");
          sManagement.addStudent();
          break;

        case 2:
          // System.out.println("del");
          sManagement.delStudent();
          break;

        case 3:
          // System.out.println("udp");
          sManagement.udpStudent();
          break;

        case 4:
          // System.out.println("sel");
          sManagement.selStudent();
          break;

        case 0:
          System.out.println("exit");
          // 跳出指定循环
          break Loop;

        default:
          System.out.println("输入有误");
          break;
      }
    }
  }
}